﻿using System;
using Autodesk.Revit.DB;
using Teigha.Core;
using Teigha.TD;

namespace YJKCopyModel.LastFastModeling
{
	public class PointPosBlockDuctCoilInfo : PointPosBlockInfo
	{
		public XYZ BlockPlaceLocation
		{
			get
			{
				return this.m_BlockPlaceLocation;
			}
			set
			{
				this.m_BlockPlaceLocation = value;
			}
		}

		public XYZ BlockAxisY
		{
			get
			{
				return this.m_vcAxisY;
			}
		}

		public PointPosBlockDuctCoilInfo(OdDbBlockReference odDbBlockRef, ImportInstance ImportIns) : base(odDbBlockRef, ImportIns)
		{
			base.GetCurves();
			this.GetYAxisDir();
		}

		private void GetYAxisDir()
		{
			try
			{
				OdGeVector3d odGeVector3d = new OdGeVector3d(0.0, 100.0, 0.0);
				OdGeVector3d odGeVector3d2 = odGeVector3d.transformBy(this.m_odDbBlockRef.blockTransform());
				XYZ xyz = new XYZ(odGeVector3d2.x, odGeVector3d2.y, 0.0);
				Transform totalTransform = base.HostImportIns.GetTotalTransform();
				this.m_vcAxisY = totalTransform.OfVector(xyz).Normalize();
			}
			catch (Exception)
			{
			}
		}

		private XYZ m_BlockPlaceLocation;

		private XYZ m_vcAxisY = null;
	}
}
